全部文档

7.4BACnet物模型

为BACnet协议产品提供BACnet协议相关属性的增删改查功能

7.4.1根据BACnet产品ID查询所有功能

功能描述:指定产品,获取该产品下所有BACnet功能信息。

GET  /api/v1/products/protocol/7/property

Query:

Name Type Description Required
productId int 产品ID Yes

cURL example:

curl --location --request GET '{{address}}/api/v1/protocol/7/property?accessKeyId={accessKeyId}&signatureNonce={signatureNonce}&signature={signature}&productId=1000010'
--header 'platform: 3' \
--header 'projectId: {projectId}'

Response body:

Name Type Description
id int Modbus功能属性ID
name string 功能名称
identifier string 属性名称(该产品下唯一)
unit string 属性单位
accessMode int 属性读写类型,只读(1:R),读写(2:RW),只写(3:W)
type int 数据类型,数据类型值请参考公共能力type类型码表,
当读命令码为"0x01"(线圈状态),"0x02"(离散输入变量)时该参数值只能为bool,不传则默认为bool。
unit string 属性单位
minimum number 参数最小值(数值类型特有)
maximum number 参数最大值(数值类型特有)
minString string 参数最小值(数值类型特有)
maxString string 参数最大值(数值类型特有)
productId number 产品ID
userId string 用户ID
nodeName String 节点名称
readFlag string 读命令码,16进制值,支持值选项: 线圈状态 "0x01"; 离散输入变量 "0x02"; 保持寄存器 "0x03"; 输入寄存器 "0x04"
writeFlag string 写命令码,16进制值,支持值选项:线圈状态 "0x05" ,"0x0F"; 保持寄存器 "0x06" ,"0x10"
scalingfactor double 缩放因子,此字段只有type为数值类型有效,默认为1.0。有效值不能为0。
swapByte int 是否交换高低字节(不变:0;变:1),把寄存器内16位数据的前后8个bits互换。默认为0。该字段仅对type为数值类型有效。其他类型将设置为0。
swapOrder int 是否交换顺序(不变:0;变:1),把原始数据32位数据的bits互换。默认为0。该字段仅对type为数值类型有效。其他类型将设置为0。
reportMethod int 上报方式,目前只支持按时上报,值 1 : time, 默认为该值
registerAddress string 寄存器起始地址,16进制值,范围0x0000~0xffff
registerNumber int 寄存器个数,用于确定string类型的数据占用长度。只有type为string时该数据有效。
objectId int 对象ID, 仅支持数字,最多22位。当选择同样对象类型时,对象ID不能重复
objectType int 对象类型
propertyId int 属性ID

Response example:

{
    "code":0,
    "data":[
            {
                "nodeName":"",
                "identifier":"dafdfadfadf",
                "productId":101641,
                "minString":null,
                "kind":2,
                "accessMode":2,
                "type":1,
                "userId":null,
                "maxString":null,
                "required":false,
                "objectType":0,
                "special":{
                    "length":1,
                    "step":null,
                    "enumArray":null
                },
                "unit":"11",
                "name":"atefad",
                "maximum":0,
                "id":2722,
                "minimum":0,
                "propertyId":85,
                "class":1,
                "objectId":111
            },
            {
                "nodeName":"",
                "identifier":"testbac",
                "productId":101641,
                "minString":null,
                "kind":2,
                "accessMode":2,
                "type":1,
                "userId":null,
                "maxString":null,
                "required":false,
                "objectType":0,
                "special":{
                    "length":1,
                    "step":null,
                    "enumArray":null
                },
                "unit":"1",
                "name":"testbac",
                "maximum":0,
                "id":2721,
                "minimum":0,
                "propertyId":85,
                "class":1,
                "objectId":1
            }
        ],
    "message":"成功",
    "referInfo":""
}

7.2.2分页查询BACnet属性

功能描述:根据产品ID查询产品功能, 返回产品功能的详细信息。

GET  /api/v1/products/protocol/7/property/page

Query:

Name Type Description Required
productId int 产品ID Yes
pageSize int 分页大小 Yes
currentPage int 页码 Yes

cURL example:

curl --location --request GET '{{address}}/api/v1/protocol/7/property/page?accessKeyId={accessKeyId}&signatureNonce={signatureNonce}&signature={signature}&productId=1000081&pageSize=10&currentPage=1'
--header 'platform: 3' \
--header 'projectId: {projectId}'

Response data:

Name Type Description
currentPage int 页码
pageSize int 每页条数(范围:1-50)
content struct[] 当前页内容
totalCount long 总条数
totalPage int 总页数

Response data content的子对象结构体:

Name Type Description
id int Modbus功能属性ID
name string 功能名称
identifier string 属性名称(该产品下唯一)
unit string 属性单位
accessMode int 属性读写类型,只读(1:R),读写(2:RW),只写(3:W)
type int 数据类型,数据类型值请参考公共能力type类型码表,
当读命令码为"0x01"(线圈状态),"0x02"(离散输入变量)时该参数值只能为bool,不传则默认为bool。
unit string 属性单位
minimum number 参数最小值(数值类型特有)
maximum number 参数最大值(数值类型特有)
minString string 参数最小值(数值类型特有)
maxString string 参数最大值(数值类型特有)
productId number 产品ID
userId string 用户ID
nodeName String 节点名称
readFlag string 读命令码,16进制值,支持值选项: 线圈状态 "0x01"; 离散输入变量 "0x02"; 保持寄存器 "0x03"; 输入寄存器 "0x04"
writeFlag string 写命令码,16进制值,支持值选项:线圈状态 "0x05" ,"0x0F"; 保持寄存器 "0x06" ,"0x10"
scalingfactor double 缩放因子,此字段只有type为数值类型有效,默认为1.0。有效值不能为0。
swapByte int 是否交换高低字节(不变:0;变:1),把寄存器内16位数据的前后8个bits互换。默认为0。该字段仅对type为数值类型有效。其他类型将设置为0。
swapOrder int 是否交换顺序(不变:0;变:1),把原始数据32位数据的bits互换。默认为0。该字段仅对type为数值类型有效。其他类型将设置为0。
reportMethod int 上报方式,目前只支持按时上报,值 1 : time, 默认为该值
registerAddress string 寄存器起始地址,16进制值,范围0x0000~0xffff
registerNumber int 寄存器个数,用于确定string类型的数据占用长度。只有type为string时该数据有效。
objectId int 对象ID, 仅支持数字,最多22位。当选择同样对象类型时,对象ID不能重复
objectType int 对象类型
propertyId int 属性ID

Response example:

{
    "code":0,
    "data":[
            {
                "nodeName":"",
                "identifier":"dafdfadfadf",
                "productId":101641,
                "minString":null,
                "kind":2,
                "accessMode":2,
                "type":1,
                "userId":null,
                "maxString":null,
                "required":false,
                "objectType":0,
                "special":{
                    "length":1,
                    "step":null,
                    "enumArray":null
                },
                "unit":"11",
                "name":"atefad",
                "maximum":0,
                "id":2722,
                "minimum":0,
                "propertyId":85,
                "class":1,
                "objectId":111
            },
            {
                "nodeName":"",
                "identifier":"testbac",
                "productId":101641,
                "minString":null,
                "kind":2,
                "accessMode":2,
                "type":1,
                "userId":null,
                "maxString":null,
                "required":false,
                "objectType":0,
                "special":{
                    "length":1,
                    "step":null,
                    "enumArray":null
                },
                "unit":"1",
                "name":"testbac",
                "maximum":0,
                "id":2721,
                "minimum":0,
                "propertyId":85,
                "class":1,
                "objectId":1
            }
        ],
    "message":"成功",
    "referInfo":""
}

7.4.3创建BACnet物模型草稿

功能描述:指定产品,为该产品添加一个BACnet物模型草稿。

POST  /api/v1/products/protocol/7/property/draft

Body:

Name Type Description Required
name string 功能名称 Yes
identifier string 属性名称(该产品下唯一) Yes
accessMode int 属性读写类型,只读(1:R),读写(2:RW),只写(3:W) Yes
type int 数据类型,具体值参考公共能力type类型码表。 Yes
unit string 属性单位 Yes
class int 属性种类 1: 属性, 2: 事件 Yes
kind int 功能分类(1:标准/2:自定义) Yes
objectId int 对象ID, 仅支持数字,最多22位。当选择同样对象类型时,对象ID不能重复 Yes
objectType int 对象类型 Yes
propertyId int 属性ID Yes
special struct 对部分数据类型的补充说明 No(string/bytes/float32/float64/boolean/enum时必传)
minimum number 参数最小值(数值类型特有) No,type为数值类型必填
maximum number 参数最大值(数值类型特有) No,type为数值类型必填
nodeName String 节点名称 No

special的子对象结构体:

Name Type Description Required
length int string/bytes类型的字符串长度,1~2048 No(string/bytes类型时必传)
enumArray struct[] 枚举或布尔类型的相关信息的数组(布尔类型时元素的key有且仅有0/1,枚举类型时元素的个数不超过20个,key范围0~127) No(boolean或enum类型时必传)

enumArray的子对象结构体:

Name Type Description Required
key int 枚举或布尔类型的值(布尔类型时key有且仅有0/1,枚举类型时key范围0~127) Yes
describe string 值对应的说明 Yes

Body example:

{
    "productId":101641,
    "name":"testbac",
    "identifier":"testbac",
    "type":1,
    "unit":"1",
    "special":{
        "length":1
    },
    "accessMode":2,
    "class":1,
    "kind":2,
    "propertyId":85,
    "objectType":0,
    "objectId":"1"
}

cURL example:

curl --location --request POST '{{address}}/api/v1/protocol/7/property/draft?accessKeyId={accessKeyId}&signatureNonce={signatureNonce}&signature={signature}' \
--header 'projectId: {projectId}' \
--header 'platform: 3' \
--header 'Content-Type: application/json' \
--data-raw '{
                "productId":101641,
                "name":"testbac",
                "identifier":"testbac",
                "type":1,
                "unit":"1",
                "special":{
                    "length":1
                },
                "accessMode":2,
                "class":1,
                "kind":2,
                "propertyId":85,
                "objectType":0,
                "objectId":"1"
            }'

Response data:

Name Type Description
id int Modbus功能属性ID
name string 功能名称
identifier string 属性名称(该产品下唯一)
unit string 属性单位
accessMode int 属性读写类型,只读(1:R),读写(2:RW),只写(3:W)
type int 数据类型,数据类型值请参考公共能力type类型码表,
当读命令码为"0x01"(线圈状态),"0x02"(离散输入变量)时该参数值只能为bool,不传则默认为bool。
unit string 属性单位
minimum number 参数最小值(数值类型特有)
maximum number 参数最大值(数值类型特有)
minString string 参数最小值(数值类型特有)
maxString string 参数最大值(数值类型特有)
productId number 产品ID
userId string 用户ID
nodeName String 节点名称
readFlag string 读命令码,16进制值,支持值选项: 线圈状态 "0x01"; 离散输入变量 "0x02"; 保持寄存器 "0x03"; 输入寄存器 "0x04"
writeFlag string 写命令码,16进制值,支持值选项:线圈状态 "0x05" ,"0x0F"; 保持寄存器 "0x06" ,"0x10"
scalingfactor double 缩放因子,此字段只有type为数值类型有效,默认为1.0。有效值不能为0。
swapByte int 是否交换高低字节(不变:0;变:1),把寄存器内16位数据的前后8个bits互换。默认为0。该字段仅对type为数值类型有效。其他类型将设置为0。
swapOrder int 是否交换顺序(不变:0;变:1),把原始数据32位数据的bits互换。默认为0。该字段仅对type为数值类型有效。其他类型将设置为0。
reportMethod int 上报方式,目前只支持按时上报,值 1 : time, 默认为该值
registerAddress string 寄存器起始地址,16进制值,范围0x0000~0xffff
registerNumber int 寄存器个数,用于确定string类型的数据占用长度。只有type为string时该数据有效。
objectId int 对象ID, 仅支持数字,最多22位。当选择同样对象类型时,对象ID不能重复
objectType int 对象类型
propertyId int 属性ID

Response example:

{
  "success": true,
  "code": 0,
  "msg": "",
  "data":{
     "nodeName":"",
     "identifier":"testbac",
     "productId":101641,
     "minString":null,
     "kind":2,
     "accessMode":2,
     "type":1,
     "userId":null,
     "maxString":null,
     "required":false,
     "objectType":0,
     "special":{
         "length":1,
         "step":null,
         "enumArray":null
     },
     "unit":"1",
     "name":"testbac",
     "maximum":0,
     "id":2721,
     "minimum":0,
     "propertyId":85,
     "class":1,
     "objectId":1
  }
}

7.4.4更新BACnet物模草稿

功能描述:指定产品,更新该产品下某个BACnet物模型草稿。

PUT  /api/v1/products/protocol/7/property/draft

Body:

Name Type Description Required
id int 属性ID Yes
name string 功能名称 Yes
identifier string 属性名称(该产品下唯一) Yes
accessMode int 属性读写类型,只读(1:R),读写(2:RW),只写(3:W) Yes
type int 数据类型,具体值参考公共能力type类型码表。 Yes
unit string 属性单位 Yes
class int 属性种类 1: 属性, 2: 事件 Yes
kind int 功能分类(1:标准/2:自定义) Yes
objectId int 对象ID, 仅支持数字,最多22位。当选择同样对象类型时,对象ID不能重复 Yes
objectType int 对象类型 Yes
propertyId int 属性ID Yes
special struct 对部分数据类型的补充说明 No(string/bytes/float32/float64/boolean/enum时必传)
minimum number 参数最小值(数值类型特有) No
maximum number 参数最大值(数值类型特有) No
nodeName String 节点名称 No

special的子对象结构体:

Name Type Description Required
length int string/bytes类型的字符串长度,1~2048 No(string/bytes类型时必传)
enumArray struct[] 枚举或布尔类型的相关信息的数组(布尔类型时元素的key有且仅有0/1,枚举类型时元素的个数不超过20个,key范围0~127) No(boolean或enum类型时必传)

enumArray的子对象结构体:

Name Type Description Required
key int 枚举或布尔类型的值(布尔类型时key有且仅有0/1,枚举类型时key范围0~127) Yes
describe string 值对应的说明 Yes

Body example:

{
    "id":2729,
    "productId":101641,
    "name":"test213",
    "identifier":"test1",
    "type":1,
    "unit":"",
    "special":{
        "length":1
    },
    "accessMode":2,
    "class":1,
    "propertyId":85,
    "objectType":1,
    "objectId":"234"
}

cURL example:

curl --location --request PUT '{{address}}/api/v1/protocol/7/property/draft?accessKeyId={accessKeyId}&signatureNonce={signatureNonce}&signature={signature}' \
--header 'platform: 3' \
--header 'projectId: {projectId}' \
--header 'Content-Type: application/json' \
--data-raw '{
                "id":2729,
                "productId":101641,
                "name":"test213",
                "identifier":"test1",
                "type":1,
                "unit":"",
                "special":{
                    "length":1
                },
                "accessMode":2,
                "class":1,
                "propertyId":85,
                "objectType":1,
                "objectId":"234"
            }'

Response example:

{
    "success": true,
    "code": 0,
    "msg": "",
    "data": ""
}

7.4.5根据BACnet产品ID查询物模型草稿

功能描述:指定产品,获取该产品下所有BACnet物模型草稿。

GET  /api/v1/products/protocol/7/property/draft

Query:

Name Type Description Required
productId Integer 产品ID Yes

cURL example:

curl --location --request GET '{{address}}/api/v1/protocol/7/property/draft?accessKeyId={accessKeyId}&signatureNonce={signatureNonce}&signature={signature}&productId=1000086'
--header 'platform: 3' \
--header 'projectId: {projectId}'

Response body:

Name Type Description
id int Modbus功能属性ID
name string 功能名称
identifier string 属性名称(该产品下唯一)
unit string 属性单位
accessMode int 属性读写类型,只读(1:R),读写(2:RW),只写(3:W)
type int 数据类型,数据类型值请参考公共能力type类型码表,
当读命令码为"0x01"(线圈状态),"0x02"(离散输入变量)时该参数值只能为bool,不传则默认为bool。
unit string 属性单位
minimum number 参数最小值(数值类型特有)
maximum number 参数最大值(数值类型特有)
minString string 参数最小值(数值类型特有)
maxString string 参数最大值(数值类型特有)
productId number 产品ID
userId string 用户ID
nodeName String 节点名称
readFlag string 读命令码,16进制值,支持值选项: 线圈状态 "0x01"; 离散输入变量 "0x02"; 保持寄存器 "0x03"; 输入寄存器 "0x04"
writeFlag string 写命令码,16进制值,支持值选项:线圈状态 "0x05" ,"0x0F"; 保持寄存器 "0x06" ,"0x10"
scalingfactor double 缩放因子,此字段只有type为数值类型有效,默认为1.0。有效值不能为0。
swapByte int 是否交换高低字节(不变:0;变:1),把寄存器内16位数据的前后8个bits互换。默认为0。该字段仅对type为数值类型有效。其他类型将设置为0。
swapOrder int 是否交换顺序(不变:0;变:1),把原始数据32位数据的bits互换。默认为0。该字段仅对type为数值类型有效。其他类型将设置为0。
reportMethod int 上报方式,目前只支持按时上报,值 1 : time, 默认为该值
registerAddress string 寄存器起始地址,16进制值,范围0x0000~0xffff
registerNumber int 寄存器个数,用于确定string类型的数据占用长度。只有type为string时该数据有效。
objectId int 对象ID, 仅支持数字,最多22位。当选择同样对象类型时,对象ID不能重复
objectType int 对象类型
propertyId int 属性ID

Response example:

{
    "code":0,
    "data":[
            {
                "nodeName":"",
                "identifier":"dafdfadfadf",
                "productId":101641,
                "minString":null,
                "kind":2,
                "accessMode":2,
                "type":1,
                "userId":null,
                "maxString":null,
                "required":false,
                "objectType":0,
                "special":{
                    "length":1,
                    "step":null,
                    "enumArray":null
                },
                "unit":"11",
                "name":"atefad",
                "maximum":0,
                "id":2722,
                "minimum":0,
                "propertyId":85,
                "class":1,
                "objectId":111
            },
            {
                "nodeName":"",
                "identifier":"testbac",
                "productId":101641,
                "minString":null,
                "kind":2,
                "accessMode":2,
                "type":1,
                "userId":null,
                "maxString":null,
                "required":false,
                "objectType":0,
                "special":{
                    "length":1,
                    "step":null,
                    "enumArray":null
                },
                "unit":"1",
                "name":"testbac",
                "maximum":0,
                "id":2721,
                "minimum":0,
                "propertyId":85,
                "class":1,
                "objectId":1
            }
        ],
    "message":"成功",
    "referInfo":""
}

7.4.6根据BACnet产品ID发布物模型草稿

功能描述:指定产品,发布该产品下所有BACnet物模型草稿。

POST  /api/v1/products/protocol/7/property/draft/publish/{productId}

Path:

Name Type Description Required
productId Integer 产品ID Yes

cURL example:

curl --location --request POST '{{address}}/api/v1/products/protocol/7/property/draft/publish/101641?accessKeyId={accessKeyId}&signatureNonce={signatureNonce}&signature={signature}'
--header 'platform: 3' \
--header 'projectId: {projectId}'

Response example:

{
    "code":0,
    "data":null,
    "message":"成功",
    "referInfo":""
}

7.4.7分页查询BACnet物模型草稿

功能描述:根据产品ID查询产品所有物模型草稿。

GET  /api/v1/products/protocol/7/property/draft/page

Query:

Name Type Description Required
productId int 产品ID Yes
pageSize int 分页大小 Yes
currentPage int 页码 Yes

cURL example:

curl --location --request GET '{{address}}/api/v1/protocol/7/property/draft/page?accessKeyId={accessKeyId}&signatureNonce={signatureNonce}&signature={signature}&productId=1000081&pageSize=10&currentPage=1'
--header 'platform: 3' \
--header 'projectId: {projectId}'

Response data:

Name Type Description
currentPage int 页码
pageSize int 每页条数(范围:1-50)
content struct[] 当前页内容
totalCount long 总条数
totalPage int 总页数

Response data content的子对象结构体:

Name Type Description
id int Modbus功能属性ID
name string 功能名称
identifier string 属性名称(该产品下唯一)
unit string 属性单位
accessMode int 属性读写类型,只读(1:R),读写(2:RW),只写(3:W)
type int 数据类型,数据类型值请参考公共能力type类型码表,
当读命令码为"0x01"(线圈状态),"0x02"(离散输入变量)时该参数值只能为bool,不传则默认为bool。
unit string 属性单位
minimum number 参数最小值(数值类型特有)
maximum number 参数最大值(数值类型特有)
minString string 参数最小值(数值类型特有)
maxString string 参数最大值(数值类型特有)
productId number 产品ID
userId string 用户ID
nodeName String 节点名称
readFlag string 读命令码,16进制值,支持值选项: 线圈状态 "0x01"; 离散输入变量 "0x02"; 保持寄存器 "0x03"; 输入寄存器 "0x04"
writeFlag string 写命令码,16进制值,支持值选项:线圈状态 "0x05" ,"0x0F"; 保持寄存器 "0x06" ,"0x10"
scalingfactor double 缩放因子,此字段只有type为数值类型有效,默认为1.0。有效值不能为0。
swapByte int 是否交换高低字节(不变:0;变:1),把寄存器内16位数据的前后8个bits互换。默认为0。该字段仅对type为数值类型有效。其他类型将设置为0。
swapOrder int 是否交换顺序(不变:0;变:1),把原始数据32位数据的bits互换。默认为0。该字段仅对type为数值类型有效。其他类型将设置为0。
reportMethod int 上报方式,目前只支持按时上报,值 1 : time, 默认为该值
registerAddress string 寄存器起始地址,16进制值,范围0x0000~0xffff
registerNumber int 寄存器个数,用于确定string类型的数据占用长度。只有type为string时该数据有效。
objectId int 对象ID, 仅支持数字,最多22位。当选择同样对象类型时,对象ID不能重复
objectType int 对象类型
propertyId int 属性ID

Response example:

{
    "code":0,
    "data":[
            {
                "nodeName":"",
                "identifier":"dafdfadfadf",
                "productId":101641,
                "minString":null,
                "kind":2,
                "accessMode":2,
                "type":1,
                "userId":null,
                "maxString":null,
                "required":false,
                "objectType":0,
                "special":{
                    "length":1,
                    "step":null,
                    "enumArray":null
                },
                "unit":"11",
                "name":"atefad",
                "maximum":0,
                "id":2722,
                "minimum":0,
                "propertyId":85,
                "class":1,
                "objectId":111
            },
            {
                "nodeName":"",
                "identifier":"testbac",
                "productId":101641,
                "minString":null,
                "kind":2,
                "accessMode":2,
                "type":1,
                "userId":null,
                "maxString":null,
                "required":false,
                "objectType":0,
                "special":{
                    "length":1,
                    "step":null,
                    "enumArray":null
                },
                "unit":"1",
                "name":"testbac",
                "maximum":0,
                "id":2721,
                "minimum":0,
                "propertyId":85,
                "class":1,
                "objectId":1
            }
        ],
    "message":"成功",
    "referInfo":""
}

7.4.8根据BACnet属性ID查询BACnet属性信息

功能描述:指定属性ID,获取该属性ID下指定的BACnet属性。

GET  /api/v1/products/protocol/7/property/{id}

Path:

Name Type Description Required
id Integer 属性ID Yes

cURL example:

curl --location --request GET '{{address}}/api/v1/protocol/7/property/14?accessKeyId={accessKeyId}&signatureNonce={signatureNonce}&signature={signature}'
--header 'platform: 3' \
--header 'projectId: {projectId}'

Response body:

Name Type Description
id int BACnet功能属性ID
name string 功能名称
identifier string 属性名称(该产品下唯一)
unit string 属性单位
accessMode int 属性读写类型,只读(1:R),读写(2:RW),只写(3:W)
type int 数据类型,数据类型值请参考公共能力type类型码表,
当读命令码为"0x01"(线圈状态),"0x02"(离散输入变量)时该参数值只能为bool,不传则默认为bool。
unit string 属性单位
minimum number 参数最小值(数值类型特有)
maximum number 参数最大值(数值类型特有)
minString string 参数最小值(数值类型特有)
maxString string 参数最大值(数值类型特有)
productId number 产品ID
userId string 用户ID
nodeName String 节点名称
readFlag string 读命令码,16进制值,支持值选项: 线圈状态 "0x01"; 离散输入变量 "0x02"; 保持寄存器 "0x03"; 输入寄存器 "0x04"
writeFlag string 写命令码,16进制值,支持值选项:线圈状态 "0x05" ,"0x0F"; 保持寄存器 "0x06" ,"0x10"
scalingfactor double 缩放因子,此字段只有type为数值类型有效,默认为1.0。有效值不能为0。
swapByte int 是否交换高低字节(不变:0;变:1),把寄存器内16位数据的前后8个bits互换。默认为0。该字段仅对type为数值类型有效。其他类型将设置为0。
swapOrder int 是否交换顺序(不变:0;变:1),把原始数据32位数据的bits互换。默认为0。该字段仅对type为数值类型有效。其他类型将设置为0。
reportMethod int 上报方式,目前只支持按时上报,值 1 : time, 默认为该值
registerAddress string 寄存器起始地址,16进制值,范围0x0000~0xffff
registerNumber int 寄存器个数,用于确定string类型的数据占用长度。只有type为string时该数据有效。
objectId int 对象ID, 仅支持数字,最多22位。当选择同样对象类型时,对象ID不能重复
objectType int 对象类型
propertyId int 属性ID

Response example:

{
    "code":0,
    "data":{
                "nodeName":"",
                "identifier":"dafdfadfadf",
                "productId":101641,
                "minString":null,
                "kind":2,
                "accessMode":2,
                "type":1,
                "userId":null,
                "maxString":null,
                "required":false,
                "objectType":0,
                "special":{
                    "length":1,
                    "step":null,
                    "enumArray":null
                },
                "unit":"11",
                "name":"atefad",
                "maximum":0,
                "id":2722,
                "minimum":0,
                "propertyId":85,
                "class":1,
                "objectId":111
            },
    "message":"成功",
    "referInfo":""
}

7.4.9根据BACnet属性ID查询BACnet物模型草稿

功能描述:指定属性ID,获取该属性ID下指定的BACnet物模型草稿信息。

GET  /api/v1/products/protocol/7/property/draft/{id}

Path:

Name Type Description Required
id Integer 属性ID Yes

cURL example:

curl --location --request GET '{{address}}/api/v1/protocol/7/property/draft/14?accessKeyId={accessKeyId}&signatureNonce={signatureNonce}&signature={signature}'
--header 'platform: 3' \
--header 'projectId: {projectId}'

Response body:

Name Type Description
id int BACnet功能属性ID
name string 功能名称
identifier string 属性名称(该产品下唯一)
unit string 属性单位
accessMode int 属性读写类型,只读(1:R),读写(2:RW),只写(3:W)
type int 数据类型,数据类型值请参考公共能力type类型码表,
当读命令码为"0x01"(线圈状态),"0x02"(离散输入变量)时该参数值只能为bool,不传则默认为bool。
unit string 属性单位
minimum number 参数最小值(数值类型特有)
maximum number 参数最大值(数值类型特有)
minString string 参数最小值(数值类型特有)
maxString string 参数最大值(数值类型特有)
productId number 产品ID
userId string 用户ID
nodeName String 节点名称
readFlag string 读命令码,16进制值,支持值选项: 线圈状态 "0x01"; 离散输入变量 "0x02"; 保持寄存器 "0x03"; 输入寄存器 "0x04"
writeFlag string 写命令码,16进制值,支持值选项:线圈状态 "0x05" ,"0x0F"; 保持寄存器 "0x06" ,"0x10"
scalingfactor double 缩放因子,此字段只有type为数值类型有效,默认为1.0。有效值不能为0。
swapByte int 是否交换高低字节(不变:0;变:1),把寄存器内16位数据的前后8个bits互换。默认为0。该字段仅对type为数值类型有效。其他类型将设置为0。
swapOrder int 是否交换顺序(不变:0;变:1),把原始数据32位数据的bits互换。默认为0。该字段仅对type为数值类型有效。其他类型将设置为0。
reportMethod int 上报方式,目前只支持按时上报,值 1 : time, 默认为该值
registerAddress string 寄存器起始地址,16进制值,范围0x0000~0xffff
registerNumber int 寄存器个数,用于确定string类型的数据占用长度。只有type为string时该数据有效。
objectId int 对象ID, 仅支持数字,最多22位。当选择同样对象类型时,对象ID不能重复
objectType int 对象类型
propertyId int 属性ID

Response example:

{
    "code":0,
    "data":{
                "nodeName":"",
                "identifier":"dafdfadfadf",
                "productId":101641,
                "minString":null,
                "kind":2,
                "accessMode":2,
                "type":1,
                "userId":null,
                "maxString":null,
                "required":false,
                "objectType":0,
                "special":{
                    "length":1,
                    "step":null,
                    "enumArray":null
                },
                "unit":"11",
                "name":"atefad",
                "maximum":0,
                "id":2722,
                "minimum":0,
                "propertyId":85,
                "class":1,
                "objectId":111
            },
    "message":"成功",
    "referInfo":""
}

7.4.10根据BACnet属性ID删除BACnet物模型草稿

功能描述:指定属性ID,删除该属性ID下指定的BACnet物模型草稿。

DELETE  /api/v1/products/protocol/7/property/draft/{id}

Path:

Name Type Description Required
id Integer 属性ID Yes

cURL example:

curl --location --request DELETE '{{address}}/api/v1/api/v1/protocol/7/property/draft/14?accessKeyId={accessKeyId}&signatureNonce={signatureNonce}&signature={signature}'
--header 'platform: 3' \
--header 'projectId: {projectId}'

Response example:

{
    "code":0,
    "data":"",
    "message":"成功",
    "referInfo":""
}

results matching ""

    No results matching ""